<?php
class Shell_Command_Cd extends Shell_Command_Abstract_CommandBase implements Shell_Command_Abstract_IShellCommand
{
	public function __construct()
	{
		parent::__construct();
		$this->NAME = "cd";	
	}
	
//*************************************************************************************************
	public function execute($arguments) 
	{
		$destPath = $arguments[0];
		$fs = Core_Registry::read(Enum_RegistryItems::FILE_SYSTEM);
		$cdResult = $fs->changeLwd($destPath);
		
		if($cdResult === false) echo "\n$destPath - directory not found!\n";
		
	}

}